#ifndef UTILITIES_H
#define UTILITIES_H

#include <iostream>
#include <sstream>
#include <iomanip>
#include "vector"

#include "ngl/Camera.h"
#include "ngl/Obj.h"


/// @file Utilities.h
/// @brief provide basic utility functions
/// @author Perseedoss Rajiv
/// @version 1.0
/// @date 29.03.11
/// Revision History :
/// Initial Version 29.03.11
/// @class Utilities
/// @brief provides central static access to basic routine functions used by other objects

class Utilities
{
public:
    /// @brief returns a normalised vector
    /// @param[in] _vector the vector to normalise
    /// @param[in] _zeroVector the vector to return if the input vector is 0
    static ngl::Vector normaliseVector
            (
                const ngl::Vector _vector,
                const ngl::Vector _zeroVector=0
            );

    /// @brief scale the magnitude of a vector to a fixed value (vector limiting)
    /// @param[in] _vector the vector to scale
    /// @param[in] _scale the final magnitude to be scaled to
    /// @param[in] _zeroVector the vector to return if the input vector is 0
    static ngl::Vector scaleVectorBy
            (
                const ngl::Vector _vector,
                const float _scale=1.0,
                const ngl::Vector _zeroVector=0
            );

};

#endif // UTILITIES_H
